package com.heima.apis.article.behavior;

import com.heima.model.behavior.dtos.LikesBehaviorDto;
import com.heima.model.behavior.dtos.ReadBehaviorDto;
import com.heima.model.behavior.dtos.UnLikesBehaviorDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.pojos.WmUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Author: Luo Zeqi
 * @Date: 2022/11/17/16:36
 */
@FeignClient(value = "leadnews-behavior", contextId = "behavior")
public interface IBehaviorClient {
    /**
     * 点赞
     * @param likesBehaviorDto
     * @return
     */
    @PostMapping("/api/v1/likes_behavior/")
    ResponseResult likesBehavior(@RequestBody LikesBehaviorDto likesBehaviorDto);

    /**
     * 阅读量+1
     * @param readBehaviorDto
     * @return
     */
    @PostMapping("/api/v1/read_behavior")
    ResponseResult readBehavior(@RequestBody ReadBehaviorDto readBehaviorDto);

    /**
     * 不喜欢
     * @param unLikesBehaviorDto
     * @return
     */
    @PostMapping("/api/v1/un_likes_behavior/")
    ResponseResult unLikesBehavior(@RequestBody UnLikesBehaviorDto unLikesBehaviorDto);
}
